import { Column, Entity } from 'typeorm'
import { SoftCommonEntity } from '~/common/entity/common.entity'

export enum UserType {
  Student = 1,
  Teacher = 2,
}

@Entity({ name: 'c_work_comment' })
export class WorkCommentEntity extends SoftCommonEntity {
  @Column({ name: 'work_id' })
  workId: number

  @Column({ name: 'parent_id', nullable: true })
  parentId: number

  @Column()
  content: string

  @Column({ name: 'user_id' })
  userId: number

  @Column({ name: 'user_type', default: UserType.Teacher })
  userType: UserType
} 